-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Overviews in library #13644
base: main
Are you sure you want to change the base?
WIP: Overviews in library #13644
Conversation
Alright, thanks! Just a quick comparison of #13638 / this |
You're currently not using QPixmapCache? |
in the left screenshot it looks like the waveforms where drawn at higher resolution and then scaled down with anti-aliasing while in the right one they seem to have been drawn at screen resolution without AA? |
Update immediatly when type is changed |
Well, the idea was to have two layers of cache: One that will cache full size QImages and the other one that will cache scaled down QPixmaps with QPixmapCache. I first wanted to get the first one working properly, and only then introduce the second one. Also, thank you for the fixes. I'll incorporate them. |
Note that there are also other generic caches in Qt. QCache and QContigousCache, the latter specifically designed for caching model content (though I'm not sure how good that jives with sorting). |
I am using QCache for the full size QImages cache. |
Uff, caching the raw images is costly. Though this only happens during the session where a track is being analyzed. This is the logging commit (yes, it's a bit excessive and slows down the GUI :\ ) |
Are these LRU caches that we can cap so they don't grow without limit? |
Compared to QPixmapCache, only QCache items can be capped, but not the size. To me it didn't look like a memory leak, it's really just the cached images that are huge. (same for the QImages created by WOverview btw) |
@ninomp is there specific help / feedback you're looking for? I would love to help push this feature forward |
@ronso0 This is my work so far. This is obviously still a work in progress, but I am sharing this so that you can take a look and so that we can discuss our next steps. After we make a plan, I will split this into several smaller commits and/or PRs.
Here is a summary of changes:
WOverview
into a new component calledOverviewRenderThread
(currently not used as a dedicated overview render thread)OverviewCache
(used by bothWOverview
andOverviewDelegate
)[Waveform], WaveformOverviewType
CONote: I wasn't able to render overviews in a dedicated thread. For some reason I cannot get a database connection inside of that thread.